<?php
    include("fckeditor/fckeditor.php") ;
?>
<h2>Update page</h2>
<form method="POST" action="<?php echo site_url() . "/content/content_controller/update/". $content_id; ?>">
<table cellpadding="0" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th colspan="2">Pages</th>
        </tr>  
    </thead>
    
        <tbody>
            <tr>
                <td>Page name</td>
                <td><input type="text" name="name" value="<?php echo $name; ?>" /></td>
            </tr>
<!--
            <tr>
                <td>Page type</td>
                <td>
                    <select name="">
                        <option>template 1</option>
                        <option>template 2</option>
                    </select>
                </td>
            </tr>
-->
            <tr>
                <td>Menu</td>
                <td>
                    <?php
                        if(!empty($options)) {
                    ?>
                            <select name="parent">
            				<?php
                				if(!empty($option)) {
            				?>
						<option value=<?php echo $option['menu_id'] ?>><?php echo $option['title'] ?></option>
                                	<?php
                                    	}
                                	?>
                                    <?php
                                        foreach($options as $key => $option) {
                                    ?>
                                        <option value=<?php echo $option['menu_id'] ?>><?php echo $option['title'] ?></option>
                                    <?php
                                        }
                                    ?>
                            </select>
                    <?php
                        }
                    ?>
                </td>
            </tr>
            <?php
                if(!empty($languages)) {
            ?>
                <tr>
                    <td>Sprache</td>
                    <td>
                        <select name="language">
            			<?php
                			if(!empty($language)) {
            			?>
					<option value=<?php echo $language['language_id'] ?>><?php echo $language['name'] ?></option>
                                <?php
                                    }
                                ?>
                                <?php
                                    foreach($languages as $key => $language) {
                                ?>
                                    <option value=<?php echo $language['language_id'] ?>><?php echo $language['name'] ?></option>
                                <?php
                                    }
                                ?>
                        </select>
                    </td>
                </tr>
            <?php
                }
            ?>
            <tr>
                <?php
                    $sBasePath = '/agent24/application/views/cms_pages/fckeditor/';
                    $oFCKeditor = new FCKeditor('content') ;
                    $oFCKeditor->BasePath = $sBasePath;
                    $oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/office2003/';
                    $oFCKeditor->Value = $value;
                    $oFCKeditor->Width = '100%';
                    $oFCKeditor->Heigth = '100%';
                    $oFCKeditor->Create();
                ?>
            </tr>
        </tbody>
    <tfoot>
    <td colspan="2">
        <button>Update page</button>
    </td>
</tfoot>
</table>
</form>